<?php 
header("Content-Type: text/html; charset=utf-8");
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
require_once "config/config.php";
/**
 * Setup open library path
 */
$libs_version= array (
	"zend" => "1.10.8",
	"smarty" => "2.6.19",
	"dbtree" => "2005-09-23",
	"phpsniff" => "2.1.3",
    "phpmailer" => "1.73"
);

$openlib= new OpenLibraries($libs_version);
$openlib->setIncludePath();

bootstrap();
Zend_Registry :: set("openlib", $openlib);
$front= Zend_Registry :: get("front");
$router = $front->getRouter(); // returns a rewrite router by default

//PreauthorizeController
$router->addRoute(
		'preauthorize',
		new Zend_Controller_Router_Route('preauthorize',
				array('module' => 'front',
						'controller' => 'preauthorize',
						'action' => 'preauthorize'))
);
$router->addRoute(
		'preauthdetail',
		new Zend_Controller_Router_Route('preauthdetail/:policy_id',
				array('module' => 'front',
						'controller' => 'preauthorize',
						'action' => 'preauthdetail'))
);
$router->addRoute(
		'seachidcard',
		new Zend_Controller_Router_Route('seachidcard',
				array('module' => 'front',
						'controller' => 'preauthorize',
						'action' => 'seachidcard'))
);

//PaymentController
$router->addRoute(
		'payment',
		new Zend_Controller_Router_Route('payment',
				array('module' => 'front',
						'controller' => 'payment',
						'action' => 'payment'))
);
$router->addRoute(
		'paymentpa',
		new Zend_Controller_Router_Route('paymentpa/:preauth_id',
				array('module' => 'front',
						'controller' => 'payment',
						'action' => 'paymentpa'))
);
$router->addRoute(
		'paymenter',
		new Zend_Controller_Router_Route('paymenter/:preauth_id',
				array('module' => 'front',
						'controller' => 'payment',
						'action' => 'paymenter'))
);
$router->addRoute(
		'paymentopd',
		new Zend_Controller_Router_Route('paymentopd/:preauth_id',
				array('module' => 'front',
						'controller' => 'payment',
						'action' => 'paymentopd'))
);


//FaxController
$router->addRoute(
		'ipdcheck',
		new Zend_Controller_Router_Route('ipdcheck',
				array('module' => 'front',
						'controller' => 'fax',
						'action' => 'ipdcheck'))
);
$router->addRoute(
		'ipdcheckdetail',
		new Zend_Controller_Router_Route('ipdcheckdetail',
				array('module' => 'front',
						'controller' => 'fax',
						'action' => 'ipdcheckdetail'))
);

//TransectionController
$router->addRoute(
		'patransection',
		new Zend_Controller_Router_Route('patransection',
				array('module' => 'front',
						'controller' => 'transection',
						'action' => 'patransection'))
);
$router->addRoute(
		'paymenttransection',
		new Zend_Controller_Router_Route('paymenttransection',
				array('module' => 'front',
						'controller' => 'transection',
						'action' => 'paymenttransection'))
);
$router->addRoute(
		'preauthtrandetail',
		new Zend_Controller_Router_Route('preauthtrandetail/:policy_id',
				array('module' => 'front',
						'controller' => 'transection',
						'action' => 'preauthdetail'))
);
$router->addRoute(
		'paymenttranpa',
		new Zend_Controller_Router_Route('paymenttranpa/:payment_id',
				array('module' => 'front',
						'controller' => 'transection',
						'action' => 'paymentpa'))
);

//PrintController
$router->addRoute(
		'print',
		new Zend_Controller_Router_Route('print/:policy_id',
				array('module' => 'front',
						'controller' => 'print',
						'action' => 'printpdf'))
);
// $router->addRoute(
// 		'print',
// 		new Zend_Controller_Router_Route('print/:policy_id',
// 				array('module' => 'front',
// 						'controller' => 'print',
// 						'action' => 'printpreauth'))
// );
$router->addRoute(
		'printtrans',
		new Zend_Controller_Router_Route('printtrans/:preauth_id',
				array('module' => 'front',
						'controller' => 'print',
						'action' => 'printtrans'))
);

$router->addRoute(
		'printpayment',
		new Zend_Controller_Router_Route('printpayment/:preauth_id',
				array('module' => 'front',
						'controller' => 'printpayment',
						'action' => 'printpayment'))
);
$router->addRoute(
		'printpaymenttrans',
		new Zend_Controller_Router_Route('printpaymenttrans/:payment_id',
				array('module' => 'front',
						'controller' => 'printpayment',
						'action' => 'printpaymenttrans'))
);
$router->addRoute(
		'paymentcancel',
		new Zend_Controller_Router_Route('paymentcancel/:payment_id',
				array('module' => 'front',
						'controller' => 'printpayment',
						'action' => 'paymentcancel'))
);
$router->addRoute(
		'printcanceltrans',
		new Zend_Controller_Router_Route('printcanceltrans/:payment_id',
				array('module' => 'front',
						'controller' => 'printpayment',
						'action' => 'printcanceltrans'))
);

//IndexController
$router->addRoute(
		'contact',
		new Zend_Controller_Router_Route('contact',
				array('module' => 'front',
						'controller' => 'index',
						'action' => 'contact'))
);
$router->addRoute(
		'about',
		new Zend_Controller_Router_Route('about',
				array('module' => 'front',
						'controller' => 'index',
						'action' => 'about'))
);
$router->addRoute(
		'logout',
		new Zend_Controller_Router_Route('logout',
				array('module' => 'front',
						'controller' => 'index',
						'action' => 'logout'))
);
$router->addRoute(
		'unblockie',
		new Zend_Controller_Router_Route('unblockie',
				array('module' => 'front',
						'controller' => 'index',
						'action' => 'unblockie'))
);
$router->addRoute(
		'unblockchrome',
		new Zend_Controller_Router_Route('unblockchrome',
				array('module' => 'front',
						'controller' => 'index',
						'action' => 'unblockchrome'))
);
$router->addRoute(
		'unblockfirefox',
		new Zend_Controller_Router_Route('unblockfirefox',
				array('module' => 'front',
						'controller' => 'index',
						'action' => 'unblockfirefox'))
);

$front->dispatch();
$libs_version = $openlib = $front = null;